<?php

namespace App\Observers;

use App\Models\Classify;

class ClassifyObserver
{
    /**
     * Handle the classify "created" event.
     *
     * @param  \App\Models\Classify  $classify
     * @return void
     */
    public function created(Classify $classify)
    {
        \Cache::forget('categoryGoods');
    }

    /**
     * Handle the classify "updated" event.
     *
     * @param  \App\Models\Classify  $classify
     * @return void
     */
    public function updated(Classify $classify)
    {
        \Cache::forget('categoryGoods');
    }

    /**
     * Handle the classify "deleted" event.
     *
     * @param  \App\Models\Classify  $classify
     * @return void
     */
    public function deleted(Classify $classify)
    {
        \Cache::forget('categoryGoods');
    }

    /**
     * Handle the classify "restored" event.
     *
     * @param  \App\Models\Classify  $classify
     * @return void
     */
    public function restored(Classify $classify)
    {
        //
    }

    /**
     * Handle the classify "force deleted" event.
     *
     * @param  \App\Models\Classify  $classify
     * @return void
     */
    public function forceDeleted(Classify $classify)
    {
        //
    }
}
